import request from "@/utils/request";

/**
 * 搜索新闻
 * @param queryString
 * @returns
 */
export const searchNewsList = (queryString: string) => {
  return request.get('/article/searchNews/' + queryString)
}

/**
 * 获取新闻列表
 * @param data
 * @returns
 */
export const getNewsList = (params: any) => {
  return request.post('/article/list', params)
}

/**
 * 获得推荐的新闻
 * @returns
 */
export const listRecomNews = (params) => {
  return request.post('/article/recommendNews',params)
}

/**
 * 获取新闻详情
 * @param path
 * @returns
 */
export const getNewsDetail = (path) => {
  return request.get('/article/detail/' + path)
}

export const listHotNews = (params) => {
  return request.post('/article/hotNews',params)
}
